#ifndef __XSIP_HEADER_H__
#define __XSIP_HEADER_H__
#include "xobject.h"
typedef unsigned short uint16_t;

class XSIP_API XSIPHeader {
public:
	typedef struct _header {
		uint16_t cmd;
		uint16_t size;
		char data[64];
	} header;
	XSIPHeader();
	~XSIPHeader();

	void copy(XSIPHeader* src, int i);

	header* getHeader(int i);
	void addHeader(int i, char* value);
	void addHeader(int i, int v);
	void addHeader(int i, void* val, int size);
	void clearHeader(int i);

	bool serializeToArray(void* byte, int size);
	bool parseFromArray(void* data, int size);
	int getHeaderSize();
private:
	header m_header[32];
};

#endif